package com.ebupt.migu.music.kafka.entity;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.stereotype.Component;

@Component
public class KafkaConsumer {

//    @KafkaListener(topics = {"tz"})
    public void receiveMsg(ConsumerRecord<String,String> consumerRecord){
        System.out.println("receive start! --------------");
        System.out.println("topic:"+consumerRecord.topic());
        System.out.println("key:"+consumerRecord.key());
        System.out.println("value:"+consumerRecord.value());
        System.out.println("partition:"+consumerRecord.partition());
        System.out.println("timestamp:"+consumerRecord.timestamp());
        System.out.println("receive end! --------------------");
    }
}
